﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["name"] != null)
        {
            Label_status.Text = "当前用户：" + Session["name"];
        }
        else
        {
            Label_status.Text = "当前状态：未登录";
        }
        Label1.Text = DateTime.Now.ToLongTimeString();
    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        Label1.Text = DateTime.Now.ToLongTimeString();
    }
   
    protected void lb_exit_Click1(object sender, EventArgs e)
    {
        Session.RemoveAll();
        Response.Write("<script>window.alert('已注销，请先登录！');location.href='dengluaspx.aspx';</script>");
      
    }
}
